package com.lucenly.spell.activity

import androidx.recyclerview.widget.LinearLayoutManager
import com.lucenly.spell.adapter.RecordAdapter
import com.lucenly.spell.base.BaseActivity
import com.lucenly.spell.databinding.ActivityRecordBinding

class RecordActivity : BaseActivity<ActivityRecordBinding>() {
    var type:Int = 0 //0 充值记录  1提现记录
    override fun getViewBinding(): ActivityRecordBinding {
        return ActivityRecordBinding.inflate(layoutInflater,baseBinding.contentMain,true)
    }

    override fun setTitle(): String {
        type = intent.getIntExtra("type",0)
        return if (type==0){
            "充值记录"
        }else{
            "提现记录"
        }
    }

    override fun initData() {
        var list = arrayListOf<String>()
        for (i in 1..10){
            list.add(""+i)
        }
//        binding.content.setBackgroundColor(color)
        binding.recyclerView.layoutManager = LinearLayoutManager(context)
        val itemAdapter = RecordAdapter(list, context)
        binding.recyclerView.adapter = itemAdapter
    }

    override fun initEvent() {
    }

    override fun startObserve() {
    }
}